#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "linematch.h"
#include <qqueue.h>
#include "qrcodedetect.h"

namespace Ui {
class MainWindow;
}

struct MathPoint
{
    double x;
    double y;
    double r;
};


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:

    bool opencvFitLine(QQueue<MathPoint> pointData, MathPoint &point1Out, MathPoint &point2Out,
                                  double &corationCoefficient, double &a_out, double &b_out, double &c_out);





private slots:
    void on_pushButton_clicked();

    void on_pushButton_browser_files_clicked();

    void on_pushButton_setParameter_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_browser_files_2_clicked();

    void on_pushButton_detectQrCode_clicked();

private:
    Ui::MainWindow *ui;
    LineMatch *lineMatch;
    QrcodeDetect *qrcodeDetect;
};

#endif // MAINWINDOW_H
